package com.kelvem.saas.workbanch.core.experiment;

import com.kelvem.saas.workbanch.fsm.anno.event.RegisterEvent;
import org.springframework.stereotype.Service;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

@Service
@Deprecated
public class EventContainer {
    
    private static Map<String, EventItem> eventMap = new HashMap<String, EventItem>();
    
    public static void _register(RegisterEvent event, Method method, String beanName) {
        eventMap.put(event.eventCode(), new EventItem(event.eventCode(), method, beanName));
    }
    
    public static EventItem _getEventItem(String eventCode) {
        return eventMap.get(eventCode);
    }
}
